package com.imonsoft.sqm.service.excel.BaseExcel;

import java.io.InputStream;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.imonsoft.common.httpModel.ReturnMessage;

public interface ExcelService{
	/**
	 * 模板下载
	 * @param request
	 * @param response
	 * @param excelName
	 * @return
	 * @throws RuntimeException
	 */
	public ReturnMessage loadExcelModel(HttpServletRequest request, HttpServletResponse response, String excelName) throws RuntimeException;

	/**
	 * 读取Excel
	 * @param file excel文件
	 * @param maxSize 最大行数
	 * @param startRow 开始行号
	 * @return
	 * @throws Exception
	 */
	public List<Object[]> readExcel(InputStream in,int maxSize, int startRow) throws Exception;
	/**
	 * 读取Excel
	 * @param file excel文件
	 * @param maxSize 最大行数
	 * @param startRow 开始行号
	 * @param endRow 结束行号
	 * @return
	 * @throws Exception
	 */
	public List<Object[]> readExcelByModel(InputStream in,int maxSize, int startRow,int endRow) throws Exception;
	
	public ReturnMessage loadPdf(HttpServletRequest request, HttpServletResponse response, String excelName);
}

